/**
 * fileName:  MasterBasisStore.java
 * author:  Lei
 * Company:  Cloudland Studio
 * Createdate:  2014-5-29 下午9:45:14
 *
 * All rights Reserved, Designed By cloudland Copyright(C) 2010-2011
 *   
 * Modification  History:
 *     Date           Author        Version        
 * -------------------------------------------
 * 2014-5-29          Lei            1.0        
 *
 * Why & What is modified:
 * 1.0: 文件创建
 */
package org.cloudland.commercial.masterdata;

import org.cloudland.commercial.masterdata.handler.ArgumentCostStore;
import org.cloudland.commercial.masterdata.handler.ArgumentStore;
import org.cloudland.commercial.masterdata.handler.EfficacyStore;
import org.cloudland.commercial.masterdata.handler.FruitCategoryStore;
import org.cloudland.commercial.masterdata.handler.FruitStore;
import org.cloudland.commercial.masterdata.handler.NutritionStore;
import org.cloudland.commercial.masterdata.handler.RegionDictStore;
import org.cloudland.commercial.masterdata.handler.support.ArgumentCostImpl;
import org.cloudland.commercial.masterdata.handler.support.ArgumentImpl;
import org.cloudland.commercial.masterdata.handler.support.EfficacyImpl;
import org.cloudland.commercial.masterdata.handler.support.FruitCategoryImpl;
import org.cloudland.commercial.masterdata.handler.support.FruitImpl;
import org.cloudland.commercial.masterdata.handler.support.NutritionImpl;
import org.cloudland.commercial.masterdata.handler.support.RegionDictImpl;
import org.cloudland.commercial.masterdata.service.SpringContextUtil;
import org.cloudland.commercial.masterdata.store.read.ArgumentCostReader;
import org.cloudland.commercial.masterdata.store.read.ArgumentReader;
import org.cloudland.commercial.masterdata.store.read.EfficacyReader;
import org.cloudland.commercial.masterdata.store.read.FruitArgumentReader;
import org.cloudland.commercial.masterdata.store.read.FruitCategoryReader;
import org.cloudland.commercial.masterdata.store.read.FruitEfficacyRelationReader;
import org.cloudland.commercial.masterdata.store.read.FruitMasterReader;
import org.cloudland.commercial.masterdata.store.read.FruitNutritionReader;
import org.cloudland.commercial.masterdata.store.read.FruitStructureReader;
import org.cloudland.commercial.masterdata.store.read.NutrientReader;
import org.cloudland.commercial.masterdata.store.read.ParamValueRelReader;
import org.cloudland.commercial.masterdata.store.read.RegionDictReader;
import org.cloudland.commercial.masterdata.store.write.ArgumentCostWriter;
import org.cloudland.commercial.masterdata.store.write.ArgumentWriter;
import org.cloudland.commercial.masterdata.store.write.EfficacyWriter;
import org.cloudland.commercial.masterdata.store.write.FruitArgumentWriter;
import org.cloudland.commercial.masterdata.store.write.FruitCategoryWriter;
import org.cloudland.commercial.masterdata.store.write.FruitEfficacyRelationWriter;
import org.cloudland.commercial.masterdata.store.write.FruitMasterWriter;
import org.cloudland.commercial.masterdata.store.write.FruitNutritionWriter;
import org.cloudland.commercial.masterdata.store.write.FruitStructureWriter;
import org.cloudland.commercial.masterdata.store.write.NutrientWriter;
import org.cloudland.commercial.masterdata.store.write.ParamValueRelWriter;
import org.cloudland.commercial.masterdata.store.write.RegionDictWriter;

/**
 * <pre>
 * 获取字典、基础配置、参数信息.
 * </pre>
 * 
 * @ClassName MasterBasisStore
 * @author Lei
 * @version %I%, %G%
 * @see
 * @since JDK1.6
 * 
 */
public final class MasterBasisStore {

	/**
	 * fruitCategoryImpl 水果分类仓储
	 */
	private final static FruitCategoryStore fruitCategoryImpl = new FruitCategoryImpl(
			SpringContextUtil.getBean(FruitCategoryWriter.class),
			SpringContextUtil.getBean(FruitCategoryReader.class),
			SpringContextUtil.getBean(ParamValueRelWriter.class),
			SpringContextUtil.getBean(ParamValueRelReader.class),
			SpringContextUtil.getBean(ArgumentReader.class),
			SpringContextUtil.getBean(ArgumentCostReader.class));

	/**
	 * efficacyImpl 功效字典仓储
	 */
	private final static EfficacyStore efficacyImpl = new EfficacyImpl(
			SpringContextUtil.getBean(EfficacyWriter.class),
			SpringContextUtil.getBean(EfficacyReader.class));

	/**
	 * nutritionImpl 营养信息仓储
	 */
	private final static NutritionStore nutritionImpl = new NutritionImpl(
			SpringContextUtil.getBean(NutrientWriter.class),
			SpringContextUtil.getBean(NutrientReader.class));

	/**
	 * argumentImpl 水果参数仓储
	 */
	private final static ArgumentStore argumentImpl = new ArgumentImpl(
			SpringContextUtil.getBean(ArgumentWriter.class),
			SpringContextUtil.getBean(ArgumentReader.class));

	/**
	 * argumentCostImpl 参数取值仓储
	 */
	private final static ArgumentCostStore argumentCostImpl = new ArgumentCostImpl(
			SpringContextUtil.getBean(ArgumentCostWriter.class),
			SpringContextUtil.getBean(ArgumentCostReader.class));

	/**
	 * fruitStore 水果操作仓储
	 */
	private final static FruitStore fruitImpl = new FruitImpl(
			SpringContextUtil.getBean(FruitMasterWriter.class),
			SpringContextUtil.getBean(FruitNutritionWriter.class),
			SpringContextUtil.getBean(FruitArgumentWriter.class),
			SpringContextUtil.getBean(FruitStructureWriter.class),
			SpringContextUtil.getBean(FruitEfficacyRelationWriter.class),
			SpringContextUtil.getBean(FruitNutritionReader.class),
			SpringContextUtil.getBean(NutrientReader.class),
			SpringContextUtil.getBean(FruitArgumentReader.class),
			SpringContextUtil.getBean(ArgumentReader.class),
			SpringContextUtil.getBean(ArgumentCostReader.class),
			SpringContextUtil.getBean(FruitStructureReader.class),
			SpringContextUtil.getBean(FruitEfficacyRelationReader.class),
			SpringContextUtil.getBean(EfficacyReader.class),
			SpringContextUtil.getBean(FruitMasterReader.class),
			SpringContextUtil.getBean(FruitCategoryReader.class));

	/**
	 * regionDictImpl 地区字典仓储
	 */
	private final static RegionDictStore regionDictImpl = new RegionDictImpl(
			SpringContextUtil.getBean(RegionDictWriter.class),
			SpringContextUtil.getBean(RegionDictReader.class));

	/**
	 * <pre>
	 * 获取功效信息仓储
	 * </pre>
	 * 
	 * @return
	 */
	public static EfficacyStore getEfficacyInfoStore() {
		return efficacyImpl;
	}

	/**
	 * <pre>
	 * 获取营养信息仓储
	 * </pre>
	 * 
	 * @return
	 */
	public static NutritionStore getNutritionInfoStore() {
		return nutritionImpl;
	}

	/**
	 * <pre>
	 * 获取水果分类仓储
	 * </pre>
	 * 
	 * @return
	 */
	public static FruitCategoryStore getFruitCategoryStore() {
		return fruitCategoryImpl;
	}

	/**
	 * <pre>
	 * 获取水果参数仓储
	 * </pre>
	 * 
	 * @return
	 */
	public static ArgumentStore getArgumentStore() {
		return argumentImpl;
	}

	public static ArgumentCostStore getArgumentCostStore() {
		return argumentCostImpl;
	}

	/**
	 * <pre>
	 * 获取水果操作仓储
	 * </pre>
	 * 
	 * @return
	 */
	public static FruitStore getFruitStore() {
		return fruitImpl;
	}

	/**
	 * <pre>
	 * 获取地区字典仓储
	 * </pre>
	 *
	 * @return   
	 */
	public static RegionDictStore getRegionDictStore() {
		return regionDictImpl;
	}
}
